#include <stdio.h>

// fread() 读取二进制文件

int main() {
    FILE *fp;
    int i;
    int arr[5]

    fp = fopen("..\\7\\test-data.txt", "rb");
    if (fp == NULL) {
        printf("open file fail");
        return -1;
    }

    fread(arr, sizeof(int), 5, fp);

    for (i = 0; i < 5; i++) {
        printf("arr[%d]=%d\n", i, arr[i]);
    }

    return 0;
}